package com.qfedu.demo;

import org.hamcrest.Factory;

public class PersonFactory {
    /**
     * 静态工厂创建bean对象
     * @return
     */
    @Factory
    public static Person createPerson1(){
        System.out.println("静态工厂创建Person...");
        return  new Person();
    }

    /**
     * 实例工厂创建bean对象
     * @return
     */
    public  Person createPerson2(){
        System.out.println("实例工厂创建Person。。");
        return  new Person();
    }
}
